﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace NTmdb.TestProject
{
    /// <summary>
    ///     This is a test class for NetworkResultBaseTest and is intended
    ///     to contain all NetworkResultBaseTest Unit Tests
    /// </summary>
    [TestClass]
    public class NetworkResultBaseTest
    {
        /// <summary>
        ///     A test for NetworkResultBase Constructor
        /// </summary>
        [TestMethod]
        public void NetworkResultBaseConstructorTest()
        {
            var target = new NetworkResultBase();
            Assert.IsNotNull( target );
        }

        /// <summary>
        ///     A test for Error
        /// </summary>
        [TestMethod]
        public void ErrorTest()
        {
            var target = new NetworkResultBase();
            Exception expected = new ArgumentException();
            target.Error = expected;
            var actual = target.Error;
            Assert.AreSame( expected, actual );
        }

        /// <summary>
        ///     A test for SourceUrl
        /// </summary>
        [TestMethod]
        public void SourceUrlTest()
        {
            var target = new NetworkResultBase();
            string expected = Guid.NewGuid().ToString();
            target.SourceUrl = expected;
            string actual = target.SourceUrl;
            Assert.AreEqual( expected, actual );
        }
    }
}